Optimal. Leaf size=103 \[ -\frac {1}{a f (e+f x)}-\frac {i d \cosh \left (c-\frac {d e}{f}\right ) \text {Chi}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {i \sinh (c+d x)}{a f (e+f x)}-\frac {i d \sinh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {5682, 32, 3378,
3384, 3379, 3382} \begin {gather*} -\frac {i d \cosh \left (c-\frac {d e}{f}\right ) \text {Chi}\left (\frac {d e}{f}+d x\right )}{a f^2}-\frac {i d \sinh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {i \sinh (c+d x)}{a f (e+f x)}-\frac {1}{a f (e+f x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 3378
Rule 3379
Rule 3382
Rule 3384
Rule 5682
Rubi steps
\begin {align*} \int \frac {\cosh ^2(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx &=-\frac {i \int \frac {\sinh (c+d x)}{(e+f x)^2} \, dx}{a}+\frac {\int \frac {1}{(e+f x)^2} \, dx}{a}\\ &=-\frac {1}{a f (e+f x)}+\frac {i \sinh (c+d x)}{a f (e+f x)}-\frac {(i d) \int \frac {\cosh (c+d x)}{e+f x} \, dx}{a f}\\ &=-\frac {1}{a f (e+f x)}+\frac {i \sinh (c+d x)}{a f (e+f x)}-\frac {\left (i d \cosh \left (c-\frac {d e}{f}\right )\right ) \int \frac {\cosh \left (\frac {d e}{f}+d x\right )}{e+f x} \, dx}{a f}-\frac {\left (i d \sinh \left (c-\frac {d e}{f}\right )\right ) \int \frac {\sinh \left (\frac {d e}{f}+d x\right )}{e+f x} \, dx}{a f}\\ &=-\frac {1}{a f (e+f x)}-\frac {i d \cosh \left (c-\frac {d e}{f}\right ) \text {Chi}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {i \sinh (c+d x)}{a f (e+f x)}-\frac {i d \sinh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.30, size = 85, normalized size = 0.83 \begin {gather*} -\frac {i \left (d (e+f x) \cosh \left (c-\frac {d e}{f}\right ) \text {Chi}\left (d \left (\frac {e}{f}+x\right )\right )-f (i+\sinh (c+d x))+d (e+f x) \sinh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (d \left (\frac {e}{f}+x\right )\right )\right )}{a f^2 (e+f x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.52, size = 164, normalized size = 1.59
method | result | size |
risch | \(-\frac {1}{a f \left (f x +e \right )}+\frac {i d \,{\mathrm e}^{d x +c}}{2 a \,f^{2} \left (\frac {d e}{f}+d x \right )}+\frac {i d \,{\mathrm e}^{\frac {c f -d e}{f}} \expIntegral \left (1, -d x -c -\frac {-c f +d e}{f}\right )}{2 a \,f^{2}}-\frac {i d \,{\mathrm e}^{-d x -c}}{2 a f \left (d x f +d e \right )}+\frac {i d \,{\mathrm e}^{-\frac {c f -d e}{f}} \expIntegral \left (1, d x +c -\frac {c f -d e}{f}\right )}{2 a \,f^{2}}\) | \(164\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.40, size = 99, normalized size = 0.96 \begin {gather*} -\frac {1}{a f^{2} x + a f e} - \frac {i \, e^{\left (-c + \frac {d e}{f}\right )} E_{2}\left (\frac {{\left (f x + e\right )} d}{f}\right )}{2 \, {\left (f x + e\right )} a f} + \frac {i \, e^{\left (c - \frac {d e}{f}\right )} E_{2}\left (-\frac {{\left (f x + e\right )} d}{f}\right )}{2 \, {\left (f x + e\right )} a f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 141, normalized size = 1.37 \begin {gather*} \frac {{\left ({\left (-i \, d f x - i \, d e\right )} {\rm Ei}\left (-\frac {d f x + d e}{f}\right ) e^{\left (d x + c - \frac {c f - d e}{f}\right )} + i \, f e^{\left (2 \, d x + 2 \, c\right )} + {\left ({\left (-i \, d f x - i \, d e\right )} {\rm Ei}\left (\frac {d f x + d e}{f}\right ) e^{\left (\frac {c f - d e}{f}\right )} - 2 \, f\right )} e^{\left (d x + c\right )} - i \, f\right )} e^{\left (-d x - c\right )}}{2 \, {\left (a f^{3} x + a f^{2} e\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {\cosh ^{2}{\left (c + d x \right )}}{e^{2} \sinh {\left (c + d x \right )} - i e^{2} + 2 e f x \sinh {\left (c + d x \right )} - 2 i e f x + f^{2} x^{2} \sinh {\left (c + d x \right )} - i f^{2} x^{2}}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 572 vs. \(2 (97) = 194\).
time = 0.49, size = 572, normalized size = 5.55 \begin {gather*} -\frac {{\left (i \, {\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} d^{2} {\rm Ei}\left (-\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} + d e - c f}{f}\right ) e^{\left (\frac {d e - c f}{f}\right )} + i \, d^{3} e {\rm Ei}\left (-\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} + d e - c f}{f}\right ) e^{\left (\frac {d e - c f}{f}\right )} - i \, c d^{2} f {\rm Ei}\left (-\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} + d e - c f}{f}\right ) e^{\left (\frac {d e - c f}{f}\right )} + i \, {\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} d^{2} {\rm Ei}\left (\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} + d e - c f}{f}\right ) e^{\left (-\frac {d e - c f}{f}\right )} + i \, d^{3} e {\rm Ei}\left (\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} + d e - c f}{f}\right ) e^{\left (-\frac {d e - c f}{f}\right )} - i \, c d^{2} f {\rm Ei}\left (\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} + d e - c f}{f}\right ) e^{\left (-\frac {d e - c f}{f}\right )} - i \, d^{2} f e^{\left (\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )}}{f}\right )} + i \, d^{2} f e^{\left (-\frac {{\left (f x + e\right )} {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )}}{f}\right )} + 2 \, d^{2} f\right )} f^{2}}{2 \, {\left ({\left (f x + e\right )} a {\left (d - \frac {d e}{f x + e} + \frac {c f}{f x + e}\right )} f^{4} + a d e f^{4} - a c f^{5}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {cosh}\left (c+d\,x\right )}^2}{{\left (e+f\,x\right )}^2\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________